from flask import Flask, render_template
import random

app = Flask(__name__)

# 生成随机颜色的函数
def get_random_color():
    return '#{:06x}'.format(random.randint(0, 0xFFFFFF))

@app.route('/')
def index():
    # 生成一些随机数据用于展示
    colors = [get_random_color() for _ in range(5)]
    return render_template('index.html', colors=colors)

if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0',port=5000) 